<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//进度条
Route::get('/', function () {
    return view('load');
});
//首页
Route::get('/home','ListController@home')->name('home');
Route::get('/ha','UserController@ha');
//注册
Route::get('/signup','UserController@signup')->name('signup');
Route::post('/signupuser','UserController@signupuser')->name('signupuser');
//个人中心
Route::get('/ucenter','UserController@ucenter')->name('ucenter');
//登录
Route::get('/login','UserController@login')->name('login');
Route::post('/checkLogin','UserController@checkLogin')->name('checkLogin');

Route::group(['middleware' => ['checkS']],function () {
    //退出
    Route::get('/loginout','UserController@loginout')->name('loginout');
    //删除
    Route::post('/del','UserController@del')->name('del');
    //修改用户
    Route::get('/update','UserController@update')->name('update');
    Route::post('/updateuser','UserController@updateuser')->name('updateuser');
    //发表
    Route::get('/deliver','ListController@deliver')->name('deliver');
    Route::post('/loveText','ListController@loveText')->name('love');
});